package com.ts.conch.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ts.conch.common.result.CommonResult;
import com.ts.conch.entity.TsPermission;
import com.ts.conch.entity.TsPermissionCategory;

import java.util.List;
import java.util.Map;

public interface ItsPermissionService extends IService<TsPermission> {
    /**
     * @return java.util.List<com.lr.iboot.api.entity.LrResource>
     * @method queryAllLrResource
     * create by: IDai
     * description: 查询全部资源
     * create time: 2020-08-13 11:33
     * @Param: []
     */
    List<TsPermission> queryAllPermission();


    /**
     * @return int
     * @method create
     * create by: IDai
     * description: 添加资源
     * create time: 2020-08-18 9:37
     * @Param: [umsResource]
     */
    CommonResult<?> create(TsPermission permission);

    /**
     * @return int
     * @method update
     * create by: IDai
     * description: 修改资源
     * create time: 2020-08-18 9:37
     * @Param: [id, umsResource]
     */
    CommonResult<?> update(TsPermission permission);

    /**
     * @return UmsResource
     * @method getItem
     * create by: IDai
     * description: 获取资源详情
     * create time: 2020-08-18 9:37
     * @Param: [id]
     */
    CommonResult<?> getItem(String id);

    /**
     * @return int
     * @method delete
     * create by: IDai
     * description: 删除资源
     * create time: 2020-08-18 9:38
     * @Param: [id]
     */
    CommonResult<?> delete(String id);

    /**
     * @return java.util.List<UmsResource>
     * @method list
     * create by: IDai
     * description: 分页查询资源
     * create time: 2020-08-18 9:38
     * @Param: [categoryId, nameKeyword, urlKeyword, pageSize, pageNum]
     */
    CommonResult<?> list(Map<String, Object> params);

    /**
     * @return CommonResult<List<TsPermissionCategory>>
     * @method listAll
     * create by: IDai
     * description: 查询所有资源
     * create time: 2020-08-27 13:40
     * @Param: []
     */
    CommonResult<List<TsPermissionCategory>> listAll();

    /**
     * @return List<TsPermission>
     * @method queryAdminResource
     * create by: IDai
     * description: 查询指定用户的资源
     * create time: 2020-09-01 14:43
     * @Param: [adminId]
     */
    List<TsPermission> queryAdminPermission(String adminId);
}
